import cv2
import numpy as np

# 读取图像
image = cv2.imread('image.jpg')

# 应用均值滤波
smoothed_image = cv2.blur(image, (5, 5))  # 5x5的滤波器

# 显示结果
cv2.imshow('Original Image', image)
cv2.imshow('Smoothed Image (Mean Blur)', smoothed_image)
cv2.waitKey(0)
cv2.destroyAllWindows()